package com.marchsoft.musicalstore.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import javax.persistence.*;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${源}
 * Date: 2019-11-17
 * Time: 11:09
 */

@Entity
@Table(name = "coursetype")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer"})
public class CourseType {
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    private String name;//课程名称
    private int type;//课程类型
    private int state;//课程状态

    public CourseType() {
    }

    public CourseType(String name, int type, int state) {
        this.name = name;
        this.type = type;
        this.state = state;
    }

    @Override
    public String toString() {
        return "CourseType{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", type=" + type +
                ", state=" + state +
                '}';
    }
}
